package com.example.function.sys.model.pojo;


import com.example.common.support.ApplicationContextProvider;
import com.example.function.sys.model.one.SysRole;
import com.example.function.sys.service.ISysRoleService;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 * Description: <SysRole vo>. <br>
 * 系统角色
 * generate time:2021-7-21 16:48:40
 *
 * @author hanqf
 * @version V1.0
 */
@Data
public class SysRolePojo implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
     * 角色id
     */
    private Long id;


    /*
     * 角色名称
     */
    private String roleName;


    /*
     * 备注
     */
    private String roleRemarks;

    /**
     * 实体对象复制到数据对象
     */
    public static SysRolePojo wrapper(SysRole sysRole) {
        SysRolePojo sysRolePojo = new SysRolePojo();
        BeanUtils.copyProperties(sysRole, sysRolePojo);
        final ISysRoleService sysRoleService = (ISysRoleService) ApplicationContextProvider.getBean("sysRoleService");

        return sysRolePojo;
    }

}



